import { lang } from '../lang'

export const CheckLanguage = (key, language) => {
  if (
    key === '' ||
    ['zh_CN', 'en_US'].indexOf(language) === -1 ||
    !(key in lang[language])
  ) {
    return 'undefined'
  }
  return lang[language][key]
}
